PHP uses the header method to download files,
First, we will introduce the PHP header () function.
Definition and usage
The header () function sends the original HTTP header to the client.
It is important to realize that the header () function must
Network of Android series (ii) ---- HTTP request header and Response HeaderI. Introduction of HTTP headers: Correctly Setting HTTP headers helps search engines determine webpages and increase website access speeds. Generally, HTTP messages include
If you are just beginning to learn PHP, there may be many functions to study, today we will learn how to use the PHP Header (), more instructions, please refer to the PHP Chinese manual, the following is about the Header function detailed use
If you have just started to learn PHP, there may be many functions need to study, today we will learn how to use the PHP Header (), more instructions, please refer to the PHP Chinese manual, the following is a detailed use of the header function
The Header () function sends an original HTTP header [HTTP header] to the client.
The header is the string sent by the server before the server passes HTML data to the browser with HTTP co-meaning.
Separate HTML files with a blank line. For more
If you have just started to learn PHP, there may be many functions need to study, today we will learn how to use the PHP Header (), more instructions, please refer to the PHP Chinese manual, the following is a detailed use of the header function
In php, if you want to download slice files, php files, and html files, we will open them directly if you click them on the website. If you want to download these files, you can use the phpheader function to perform operations, the following
The Host header is a bound domain name, Host header is not required if no domain name exists
The so-called host header is called from the function of binding domain names in IIS. Generally, port 80 of an IP address on a Web server can only
Header ("http/1.1 404 Not Found");
Copy CodeFor the ErrorDocument 404/404.php function in Apache configuration, the
Error_page 404/404.php;
Copy CodeChange into
Error_page 404
Regardless of how many headers the page has, it executes the last one, but conditionally, for example:
Header (' location:http://www.jb51.net ');
Header (' location:http://www.g.cn ');
Header (' location:http://www.baidu.com ');
This will jump to
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.